import pytest
import subprocess
import os

current_path = os.getcwd()
allure_result_dir=os.path.join(current_path,'allure-results')
allure_report_dir=os.path.join(current_path,'allure-report')
report_path=os.path.join(allure_report_dir,'index.html')




if __name__ == '__main__':
    pytest.main()
    # 使用列表形式传递命令和参数
    # subprocess.run([
    #     'D:\\Programming_soft\\allure-2.27.0\\bin\\allure.bat',
    #     'generate',
    #     allure_result_dir,
    #     '-o', allure_report_dir,
    #     '--clean'
    # ], check=True)
    # os.system(f'allure generate {allure_result_dir} -o {allure_report_dir} --clean')
    os.system('allure generate allure-results -o allure-report --clean')
    # os.system(f'allure server {allure_result_dir}')
    #allure生成的文件
